// 搜索
/**
 * 点击搜索按钮发送请求 获取input的值作为word数据传输
 */

const template = require("babel-template");

function search(){
    console.log('ddd');
    $.ajax({
        type: 'get',
        url: 'http://www.xiongmaoyouxuan.com/api/search',
        data: {
            word: $('#search').val()
        },
        success: function (res) {
            console.log(res)
        }

    })

}

/**
 * 首页产品展示
 */
$.ajax({
    type:'get',
    url:'http://www.xiongmaoyouxuan.com/api/tab/1?start=0',
    success:function(res){
        console.log(res.data.items.list)
        let indexProduct = template()
    }
})